PATH![]() |
![]() ![]() |
Sets the proxy icon for a window that lacks an associated file.
pascal OSStatus SetWindowProxyCreatorAndType (
WindowPtr window,
OSType fileCreator,
OSType fileType,
SInt16 vRefNum);
A new, untitled window needs a proxy icon in order to maintain visual consistency with other windows under Mac OS 8.5 and later. Your application should call the SetWindowProxyCreatorAndType function when you want to establish a proxy icon for a window, but the window's data has not yet been saved to a file. See Creating a Window for an example of how your application can call the SetWindowProxyCreatorAndType function.
If the window's data has been saved to a file, your application can call the functions SetWindowProxyFSSpec or SetWindowProxyAlias to associate the file with the window and thereby establish the proxy icon. See Supporting Window Proxy Icons for examples of how your application can provide proxy icon support in its document windows.
With Mac OS 8.5, you must save and restore the current graphics port--by calling the QuickDraw functions GetPort and SetPort --around each call to the SetWindowProxyCreatorAndType function.